clc; clear; close all;

interv=[-1,1];

Pa=[3.34115869751238792, -0.12572358236293199;
-0.99258948444093420, -0.08726938252180805;
0.18698463813093191, 0.07775396198589613;
0.22170068207754312, -0.05810072034972591;
0.65096214721255929, 0.01521124989580486;
-1.98500774224586607, 0.03732748662786300;
1.77037734360645338, -0.04438449602466543;
-0.54395295849079517, 0.01489729894652281;
-0.00007633534108420, -0.00003252722792832]';

Pb=[2.64955698802109740, -0.17032071103097479;
-1.61253965198086036, -0.07303550877844978;
2.11066147002008719, 0.20780457844813049;
0.12622621036667425, -0.29774468825977385;
-10.40544788074401872, 0.27284015459226763;
26.50598191241082446, -0.03243084013165731;
-31.64520219159549086, -0.23399751004035352;
18.82082952447404267, 0.22328847392002693;
-4.48873587903633275, -0.06479010598509549]';

Pc=[2.06133050193587586, -0.16838615726588466;
-0.06985677615436003, 0.00962970518327722;
0.06233914660861828, -0.00345318736421807;
-0.08584278586624094, 0.00621083302737202;
0.04133845772184230, 0.00265187402342576;
-0.00147396867568261, -0.00216768731643202;
0.00073698433779157, 0.00108384365812586;
-0.00021056695361210, -0.00030966961656476;
0.00002632086922283, 0.00003870870206238]';

Pd=[2.00838731382344404, -0.15470173696884201;
-0.03306833695344835, 0.02291796942835211;
-0.17435860399669600, 0.04629746175401139;
1.69195785691483636, 0.32042395436038462;
-4.45700292276443033, -1.81537826928605561;
5.75507559973297234, 3.27781842717398320;
-3.70260047831342654, -2.58159085931029120;
0.94772743722552732, 0.75848946894638547;
-0.00000000000000044, -0.00000000000005448]';

Pa=flip(Pa,2);
Pb=flip(Pb,2);
Pc=flip(Pc,2);
Pd=flip(Pd,2);

Pa=convertCoeffMatrixFromABtoCD(Pa,[0,1],interv);
Pb=convertCoeffMatrixFromABtoCD(Pb,[0,1],interv);
Pc=convertCoeffMatrixFromABtoCD(Pc,[0,1],interv);
Pd=convertCoeffMatrixFromABtoCD(Pd,[0,1],interv);

P={};
P{end+1}=Pd;
P{end+1}=Pc;
P{end+1}=Pb;
P{end+1}=Pa;

save('curve_current_reviewer','P')
